<?php
/**
 * Created by IDEA.
 * User: dinesh
 * Date: Mar 25, 2012
 * Time: 4:58:05 PM
 */

?>

<link rel="stylesheet" type="text/css" href="css/dhtmlx/grid/skins/dhtmlxgrid_dhx_skyblue.css">
<link rel="STYLESHEET" type="text/css" href="css/dhtmlx/grid/dhtmlxgrid_pgn_bricks.css">
<link rel="STYLESHEET" type="text/css" href="css/dhtmlx/grid/dhtmlxgrid.css">
<link rel="STYLESHEET" type="text/css" href="css/dhtmlx/toolbar/skins/dhtmlxtoolbar_dhx_skyblue.css">
 <link rel="stylesheet" type="text/css" href="css/dhtmlx/calendar/dhtmlxcalendar.css">
 <link rel="stylesheet" type="text/css" href="css/dhtmlx/calendar/skins/dhtmlxcalendar_dhx_skyblue.css">

<script src="js/dhtmlx/grid/dhtmlxgrid.js"></script>
<script src="js/dhtmlx/grid/dhtmlxgridcell.js"></script>
<script src="js/dhtmlx/grid/ext/dhtmlxgrid_filter.js"></script>
<script src="js/dhtmlx/grid/ext/dhtmlxgrid_srnd.js"></script>
<script src="js/dhtmlx/grid/dhtmlxgrid_pgn.js"></script>
<script src="js/dhtmlx/toolbar/dhtmlxtoolbar.js"></script>
 <script src="js/dhtmlx/calendar/dhtmlxcalendar.js"></script>

<table width='100%' border='0' cellpadding='0' cellspacing='0'>

<tr>
    <td>
        <div style="margin-top:10px">
            <fieldset>
                <legend>Search Employ</legend>
                <!-- Search Div -->
                <form id="frmSearch" action="#" onsubmit="return false;">

                    <table border="0" cellspacing="5px" cellpadding="0px" width="100%">
                        <tr>
                            <td width="80px">Employ Name:</td>
                            <td width="80px"><input type="text" style="width:150px" id="searchCriteria.name"
                                                    name="searchCriteria.name"
                                                    keyfilter="alphanumeric" onKeyDown="doSearch(event)"/></td>

                            <td width="40px" align="right">NIC :</td>
                            <td width="40px"><input type="text" style="width:100px" name="searchCriteria.nic"
                                                    id="searchCriteria.nic"/></td>
                            <td width="60px" align="right">Institute :</td>
                            <td width="80px"><?php echo $this->parentInstitute ?> </td>
                            <td width="200px" align="left">
                                <button onClick="reloadGrid()" class="clsButtonSmall" id="submitButton">Search</button>
                                <input type="checkbox" id="autosearch" onClick="enableAutosubmit(this.checked)"> Enable
                                Autosearch
                            </td>
                        </tr>
                    </table>

                    <input type="hidden" id="totalRecords" name="page.totalRecords"/>
                    <input type="hidden" id="startPosition" name="page.startPosition"/>
                    <input type="hidden" id="pageSize" name="page.pageSize"/>

                </form>
            </fieldset>
        </div>
    </td>
</tr>
<tr>
    <td>
        <div>
            <div id="gridbox" style="width:1000px;height:230px;margin-top:10px;"></div>
            <div><span id="pagingArea"></span>&nbsp;<span id="infoArea"></span><span id="recfound"></span></div>
        </div>
    </td>
</tr>
<tr>
<td><!-- Data Controls Div -->
<fieldset>
<legend>Employ Details</legend>


<form method="post" id="frmData" action="">
    <input type="hidden" id="id" name="id"/>

    <div>
        <table>
            <tr>
                <td>
                    <fieldset>
                        <legend>Personal Information</legend>

                        <table>

                             <tr>
                                <td><label for="initName">Name with Initials:</label></td>
                                <td><input id="initName" name="initName" type="text" size="40"/> <span
                                        id="initNameInfo"></span></td>
                            </tr>
                            <tr>
                                <td><label for="fullName">Full Name :</label></td>
                                <td><input id="fullName" name="fullName" type="text" size="40" value=""/>
                                    <span id="fullNameInfo"> </span></td>
                            </tr>

                            <tr>
                                <td><label for="nic">NIC Number :</label></td>
                                <td><input id="nic" name="nic" type="text" size="40"
                                        /> <span
                                        id="nicInfo"></span></td>
                            </tr>

                            <tr>
                                <td><label for="birthday">Birthday :</label></td>
                                <td><input id="birthday" name="birthday" type="text" size="40"
                                        /><span
                                        id="birthdayInfo"></span></td>
                            </tr>

                            <tr>
                                <td><label for="gender">Gender :</label></td>
                                <td><input id="gender" type="radio" name="gender" value="0" >
                                    Male <input type="radio" id="gender1" name="gender" value="1">
                                    Female
                                    <select id="title" name='title'>
                                        <option value="Mr." selected>Mr.</option>
                                         <option value="Ms." selected>Ms.</option>
                                         <option value="Mrs." selected>Mrs.</option>
                                         <option value="Miss." selected>Miss.</option>
                                         <option value="Other." selected>Other.</option>
                                    </select>

                                </td>
                            </tr>

                            <tr>
                                <td><label for="institute_id">Institute :</label></td>
                                <td><select id="institute_id" name="institute_id" style="width:300px" onchange="doChangeSection();"><option value="">--Select Institute--</option>
                                                <?php echo $this->institute ?>  </select> <br/>  <span id="instituteInfo"></span>
                                </td>
                            </tr>
                             <tr>
                                <td><label for="section_id">Section/Division :</label></td>
                                <td><select id="section_id" name="section_id" style="width:300px"><option value="-1">--Select Section--</option>
                                                 </select> <br/>  <span id="sectionInfo"></span>
                                </td>
                            </tr>
                            <tr>
                                <td><label for="category_id">Employ Category :</label></td>
                                <td><select id="category_id" name="category_id" style="width:300px"><option value="-1">--Select Category--</option>
                                                <?php echo $this->category ?>  </select> <br/>  <span id="categoryInfo"></span>
                                </td>
                            </tr>
                            <tr>
                                <td><label for="designation">Designation :</label></td>
                                <td><input id="designation" name="designation" type="text" size="40"
                                        /></td>
                            </tr>
                            <tr>
                                      <td> <label for="status">Active :</label></td>
                                      <td> <input type="checkbox" value="1" id="status" name="status" checked="checked" >
                                           <span id="statusInfo"></span>
                                      </td>
                                  </tr>
                        </table>

                    </fieldset>
                </td>
                <td>
                    <fieldset>
                        <legend>Contact Information</legend>
                        <table>
                            <tr>
                                <td><label for="phoneOffice">Office Phone No :</label></td>
                                <td><input id="phoneOffice" name="phoneOffice"
                                                       type="text" size="40"
                                    />
                                </td>
                            </tr>
                            <tr>
                                <td><label for="phoneMobile">Mobile No :</label></td>
                                <td><input id="phoneMobile" name="phoneMobile" size="40"
                                                       type="text"
                                    />
                                </td>
                            </tr>
                            <tr>
                                <td><label for="phoneHome">Home Phone No :</label></td>
                                <td><input id="phoneHome" name="phoneHome"  size="40"
                                                       type="text"
                                    />
                                </td>
                            </tr>
                            <tr>
                                <td><label for="fax">Fax No :</label></td>
                                <td><input id="fax" name="fax" size="40"
                                                       type="text"
                                    />
                                </td>
                            </tr>

                            <tr>
                                <td><label for="email">E-mail :</label></td>
                                <td><input id="email" name="email" type="text" size="40"
                                        /> <span
                                        id="emailInfo"></span></td>
                            </tr>

                            <tr>
                                <td><label for="emailp">E-mail (Personal) :</label></td>
                                <td><input id="emailp" name="emailp" type="text" size="40"
                                        /> <span
                                        id="emailpInfo"></span></td>
                            </tr>
                            <tr>
                                <td><label for="imId">IM :</label></td>
                                <td><input id="imId" name="imId" type="text" size="40"
                                        />
                            </tr>

                            <tr>
                                 <td><label for="skype">Skype :</label></td>
                                <td><input id="skype" name="skype" type="text" size="40"
                                        />
                            </tr>
                        </table>
                    </fieldset>

                </td>
            </tr>
        </table>


        <table>
            <tr>
                <td>
                    <fieldset>
                        <legend>Permanent Address</legend>
                        <table>
                            <tr>
                                <td><label for="streetAddress1">Street Address :</label></td>
                                <td><input id="streetAddress1" name="streetAddress1" size="40"
                                           type="text"
                                        />
                                </td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><input id="streetAddress2" name="streetAddress2" size="40"
                                           type="text"
                                        />
                                </td>
                            </tr>
                            <tr>
                                <td><label for="city">City/Town :</label></td>
                                <td><input id="city" name="city" type="text" size="40"
                                        />
                                </td>
                            </tr>
                            <tr>
                                <td><label for="poBox">PO Box :</label></td>
                                <td><input id="poBox" name="poBox" type="text" size="40"
                                        />
                                </td>
                            </tr>

                        </table>
                    </fieldset>
                </td>
                <td>
                    <fieldset>
                        <legend>Temporary Address</legend>
                        <table>
                            <tr>
                                <td><label for="tempStreetAddress1">Street Address :</label>
                                </td>
                                <td><input id="tempStreetAddress1" name="tempStreetAddress1" size="40"
                                           type="text"
                                        />
                                </td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><input id="tempStreetAddress2" name="tempStreetAddress2" size="40"
                                           type="text"
                                        />
                                </td>
                            </tr>
                            <tr>
                                <td><label for="tempCity">City/Town :</label></td>
                                <td><input id="tempCity" name="tempCity" type="text" size="40"
                                        />
                                </td>
                            </tr>
                            <tr>
                                <td><label for="tempPoBox">PO Box :</label></td>
                                <td><input id="tempPoBox" name="tempPoBox" type="text" size="40"
                                        />
                                </td>
                            </tr>

                        </table>
                    </fieldset>
                </td>
            </tr>
        </table>


    </div>


</form>

<table border="0" cellspacing="5px" cellpadding="0px" width="100%" style="margin-top:0px;">
    <tr>
        <td>
            <button id="btnClose" onclick="closePage();" privilege="" class="clsButtonSmall">Close</button>
            <button id="btnAdd" onclick="add();" privilege="EMP.EMP" class="clsButtonSmall">Add</button>
            <button id="btnEdit" onclick="edit();" privilege="USER.EDIT" class="clsButtonSmall">Edit
            </button>
            <button id="btnDelete" onclick="del();" privilege="EMP.DELETE" class="clsButtonSmall">Delete
            </button>

            <button id="btnClear" onclick="clearButton();" privilege="" class="clsButtonSmall">Clear</button>
        </td>
        <td width="*" align="right">
            <button id="btnSave" onclick="save();" class="clsButtonSmall">Save</button>
        </td>
    </tr>
</table>
</fieldset>
</div>
</td>
</tr>
</table>


<script src="js/employee/employ.js"></script>
<div id='messagePanel'></div>